/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cq.bd.service;

import java.util.List;
import java.util.Map;

import com.cq.base.domain.Page;
import com.cq.bd.domain.SMenu;

/**
 * 菜单管理服务
 * 
 * @author huangmy
 * @date   2009-10-5
 */
public interface MenuService {
    /**
     * 获取指定的菜单
     * 
     * @param menuId
     * @return
     */
    public SMenu doGetMenu(Long menuId);
    
    /**
     * 删除菜单
     * 
     * @param menu
     */
    public void doDeleteMenu(Long menuId);
    
    /**
     * 分页查询菜单
     * 
     * @param filter
     * @param like
     * @param sort
     * @param pageNo
     * @param pageSize
     * @return
     */
    public Page pageMenus(Map<String, String> filter, Map<String, String> like, Map<String, String> sort, int pageNo, int pageSize);
    
    /**
     * 所有的非末端节点菜单
     * 
     * @return
     */
    public List<SMenu> doGetAllNotEndMenus();
    
    /**
     * 创建菜单
     * 
     * @param menu
     */
    public void doCreateMenu(SMenu menu);
    
    /**
     * 修改菜单状态
     * 
     * @param menuId
     * @param state
     */
    public void doChangeMenuState(Long menuId, int state);
    
    /**
     * 修改菜单
     * 
     * @param menu
     */
    public void doUpdateMenu(SMenu menu);
    
    /**
     * 获取菜单
     * 
     * @param upperMenuId  上级菜单ID, 0 为根目录
     * @return
     */
    public List<SMenu> doGetMenus(Long upperMenuId);
}
